﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Circle.Domain.Interface.Service;

namespace Circle.Web.Application.Utility
{
    public static class CryptoHelper 
    {
        private static ICryptoService _service;
        static CryptoHelper()
        {
            _service = DependencyResolver.Current.GetService<ICryptoService>();
        }

        public static string CreateHashOnMD5Cng(string plainValue)
        {
            return _service.CreateHashOnMD5Cng(plainValue);
        }

        public static bool CompareHashOnMD5Cng(string plainValue, string hash)
        {
            return _service.CompareHashOnMD5Cng(plainValue, hash);
        }
    }
}
